package org.taobao.ibatiside.ui.view;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.taobao.ibatiside.core.IbatisConstant;
import org.taobao.ibatiside.core.filemodel.IbatisStatement;

public class InsertFilter extends ViewerFilter {

	public InsertFilter() {
	}

	@Override
	public boolean select(Viewer viewer, Object parentElement, Object element) {
		if (element instanceof IbatisStatement){
			return ((IbatisStatement)element).getCategory() != IbatisConstant.STMT_INSERT;
		}else{
			return true;
		}
	}

}
